<style>
.tableform { background: #f8f8f8; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px; margin: 10px 15px; border: 1px solid #d9d9d9; padding: 5px;}
.division { margin: 5px; padding: 10px; line-height: normal; white-space: normal; }
.division .division { border: none; }
.division .shopping_setting th { width: 190px; }
.division .shop-setting th { width: 190px; }
.division td label, .division div label { display: inline; float: none; white-space: normal; }
.division .span-auto label { white-space: nowrap; }
.division ul, .division li { list-style: none; }
.division li { padding: 2px; }
.division .info { color: #b6b6b6; margin-left: 5px; }
.division h4 { color: #333; font-size: 12px; }
.division h3 a, .division h4 a { font-size: 12px; }
.tableform { margin: 5px 5px 10px; }
.tableform h4 { font-size: 12px; margin: 5px; border-top: 1px solid #e8e8e8; padding: 10px 10px 0; }
.tableform h5 { color: #333; font-size: 12px; margin: 0 0 5px; padding: 0 5px; }
.tableform .first, .tableform .division h4 { border: none; }
.tableform .division td a { *padding: 2px 5px 0px 5px; padding: 2px 5px; margin: 0 3px; color: #000; line-height: 20px; }
.tableform th, .tableform td { padding: 7px 5px; vertical-align: top; }
.tableform th { text-align: right; font-weight: normal; white-space: nowrap; width: 120px; padding-right: 5px; color: #4f4f4f; }
.tableform td { white-space: normal; }
.tableform table { padding: 0; }
.tableform h5.head-title { border-bottom: 1px solid #ddd; }
.tableform .red { font-weight: bold; margin: 0 2px; }



</style>
<p></p>
<h4>数据归档</h4>
<form id='form1' name="form1" method="post" action="index.php?app=archive&ctl=order&act=saveset">
<div class="tableform">

<div class="division">
<table cellspacing="0" cellpadding="0"  border="0" width="60%">
    <tbody>
        <tr>

        <td>有效的归档可让系统查询响应更快，节省等待时间，提高工作效率，对系统升级也更加便利。</td>
        </tr>
<tr>

        <td>归档后的数据在普通单据不可查询，需要在归档单据里才可查询。</td>
        </tr>
        <tr>

        <td>&nbsp;&nbsp;1.归档主要针对订单及对应发货单。</td>
        </tr>
        <tr>

        <td>&nbsp;&nbsp;2.归档默认为自动归档（12个月前已发货完成订单，每次归档时间为每月1日0点），手动归档可手动配置后即时触发</td>
        </tr>
         <tr>

        <td>&nbsp;&nbsp;<font  color='red'>3. 为了更好的使用,9:00-20:00期间禁止归档</font></td>
        </tr>
    </tbody>
</table>
</div>
</div>
<div class="tableform">
<div class="division">
<table cellspacing="0" cellpadding="0"  border="0" width="60%">
    <tbody>
        <tr>

        <td>选择归档内容:</td>
        </tr>
        <tr>

        <td><input type='checkbox' name="status[]" value='finish' checked disabled>已发货完成订单</td>
        </tr>
        <tr>

        <td><input type='checkbox' name="status[]" value='fail' checked>失败订单</td>
        </tr>
        <tr>

        <td><input type='checkbox' name="status[]" value='unpayed' checked>未支付订单</td>
        </tr>
        <tr>

        <td>选择归档时间:</td>
        </tr>
        <tr>

        <td>
        <select name="archive_time" id="archive_time">
        <!--<option value='1'>1个月前</option>
        <option value='2'>2个月前</option>
        <option value='3' selected>3个月前</option>-->
        <option value='6'>6个月前</option>
        <option value='9'>9个月前</option>
        <option value='12' selected>12个月前</option>
        </select><span style="font-weight:bold">选择</span><span id="archive_time_show"></span><span style="font-weight:bold">以前的数据进行归档</span>

        </td>
        </tr>
        <tr>

        <td>
        <input type="button" name="set-button" id='start-archive' value="开始归档">
        </td>
        </tr>
    </tbody>
</table>
</div>
</div>
</form>
<script>

$('archive_time').addEvent('change',function(e){
    var archive_time = this.value;
    new Request({
       url : 'index.php?app=archive&ctl=order&act=format_archivetime',
       method : 'post',
       data : 'archive_time='+archive_time,
       onComplete : function(rs){
           
           $('archive_time_show').set('html',rs);
       }
    }).send();

});
$('archive_time').fireEvent('change');
$('start-archive').addEvent('click',function(e){
var data = $('form1').toQueryString();

var url = "index.php?app=archive&ctl=order&act=ajaxGetArchiveData&"+data;
new Dialog(url,{width:700, height:250, title:'归档操作'});


});
//改为翻页滚

</script>
